<?php
if(isset($_POST['s']))
{
require("includes/basic.php");
$s=$_POST['s'];
$module=mysql_query("select * from module_master where LOWER(module) like LOWER('$s%')");
}
else
{
	$module=mysql_query("select * from module_master");
$noOfmodules=mysql_num_rows($module);

}
$sr=1;
$class="evenrowbg";
?>
	<table width='100%' cellpadding='1' cellspacing='0' class='list'>
	<tr>
		<th width='10%' style='white-space: nowrap;'>
			<div style='display:block;'>
				<span class="link linkdisabled">Sr no.</span>
			</div>
		</th>
        
        <th width='10%' style='white-space: nowrap;'>
			<div style='display:block;'>
				<span class="link linkdisabled">Edit</span>
			</div>
		</th>
        
        <th width='30%' style='white-space: nowrap;'>
			<div style='display:block;'>
				<span class="link linkdisabled">Module Name</span>
			</div>
		</th>
		<th width='50%' style='white-space: nowrap;'>
			<div style='display:block; '>
				<span class="link linkdisabled">Module Description</span>
			</div>
		</th>
		<!--<th width='40%' style='white-space: nowrap;'>
			<div style='display:block; width: 20px;'>
				<span class="link linkdisabled">Customer Username</span>
			</div>
		</th>
		<th width='4%' style='white-space: nowrap;' align='center'>
			<span class="link linkdisabled">Customer Password</span>
		</th>
		<th width='20%' style='white-space: nowrap;'>
			<span class="link linkdisabled">Record Status</span>
		</th>-->
		<!--<th width='10%' style='white-space: nowrap;'>
			<span class="link">Status</span>
		</th>-->
		<!--<th width='0' class='select'>
			<form name="frm">
<input type='checkbox' class='checkbox' name='allCheck' onClick='selectallMe()'>
		</th>-->
	</tr>
	<?php while($moduletr=mysql_fetch_array($module))
	{
		$moduleid=$moduletr['module_id'];
		$modulename=$moduletr['module'];
		$module_desc=$moduletr['module_desc'];
		
		
			
		if($class=="evenrowbg")
		{
			$class="oddrowbg";
		}
		else
		{
			$class="evenrowbg";
		}
		echo "<tr class='$class'><td style='text-align:center;'>$sr</td>";
		echo "<td style='text-align:center;'><a href='edit-modules.php?moduleid=$moduleid'><img src='images/edit.png'/></a></td>";
		
		echo "<td style='padding:5px;'>".$modulename."</td><td style='padding:5px;'>".$module_desc."</td>";
			
		
		
		$sr++;
	}

	?>
  

</table>